import worker from '@ohos.worker';
import Brightness from '@ohos.brightness';

const { parentPort } = worker;
const TAG = "brightness_worker";

parentPort.onmessage = function(message){
    console.log(TAG, `parent port onMessage enter, message: ${JSON.stringify(message.data)}`);

    let brightness = message.data["value"];

    Brightness.setValue(brightness);
}